using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace mailer
{
    public partial class ConfigForm : Form
    {
        public ConfigForm()
        {
            InitializeComponent();
        }
        
        public bool flag;

        public void Initialize(string server, string port, string un, string password, int sleeptime, string file)
        {
            this.server_textBox.Text = server;
            this.port_textBox.Text = port;
            this.username_textBox.Text = un;
            this.password_textBox.Text = password;
            this.numericUpDown1.Value = sleeptime;
            this.file_textBox.Text = file;
        }

        private void ConfigForm_Load(object sender, EventArgs e)
        {
            flag = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            flag = false;
        }

        private void server_textBox_TextChanged(object sender, EventArgs e)
        {
            flag = true;
            this.button1.Enabled=true;
        }

        private void port_textBox_TextChanged(object sender, EventArgs e)
        {
            flag = true;
            this.button1.Enabled=true;
        }

        private void username_textBox_TextChanged(object sender, EventArgs e)
        {
            flag = true;
            this.button1.Enabled=true;
        }

        private void password_textBox_TextChanged(object sender, EventArgs e)
        {
            flag = true;
            this.button1.Enabled=true;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}